home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.20031118-20041115 / 000017_fdc@columbia.edu_Tue Nov 25 09:58:33 2003.msg < prev    next >
Internet Message Format  |  2020-01-01  |  2KB

  1. Path: newsmaster.cc.columbia.edu!not-for-mail
  2. From: Frank da Cruz <fdc@columbia.edu>
  3. Newsgroups: comp.protocols.kermit.misc
  4. Subject: Re: How do I get kermit to return a code to a calling Linux Script ?
  5. Date: 25 Nov 2003 14:57:36 GMT
  6. Organization: Columbia University
  7. Lines: 42
  8. Message-ID: <slrnbs6rf0.oig.fdc@sesame.cc.columbia.edu>
  9. References: <f0bb0f39.0311250618.1bb06acf@posting.google.com>
  10. Reply-To: fdc@columbia.edu
  11. NNTP-Posting-Host: sesame.cc.columbia.edu
  12. X-Trace: newsmaster.cc.columbia.edu 1069772256 26064 128.59.59.56 (25 Nov 2003 14:57:36 GMT)
  13. X-Complaints-To: postmaster@columbia.edu
  14. NNTP-Posting-Date: 25 Nov 2003 14:57:36 GMT
  15. User-Agent: slrn/0.9.7.4 (SunOS)
  16. Xref: newsmaster.cc.columbia.edu comp.protocols.kermit.misc:14693
  17.  
  18. In article <f0bb0f39.0311250618.1bb06acf@posting.google.com>,
  19. newexpectuser wrote:
  20. : I have the following line that I purposely triggered to try to
  21. : simulate a timeout condition in my script:
  22. : .
  23. : .
  24. : .
  25. ::1, echo PASSWORD PROMPT OK
  26. :     lineout xxxxxxxxx
  27. :     input 10 "#"
  28. :     if fail break stop 1 output \quit\13
  29. : .
  30. : .
  31. : .
  32. : }
  33. : echo "Outside loop"
  34. : bye
  35. : exit
  36. : I have a Linux script calling this Kermit script, but it doesn't seem
  37. : to recognize the return code of a 1 from the stop command ?...I had to
  38. : use the 'output \quit\13' because the stop was leaving me at the
  39. : "C-Kermit>" prompt, I guess this is the correct syntax, because it put
  40. : me back into my calling script.
  41. :
  42. Please read about the END, STOP, and EXIT commands.  Each does a different
  43. thing.  From your description I think you need the EXIT command in this
  44. case.
  45.  
  46. Also you are probably better off coding the entire procedure in Kermit,
  47. rather than trying to mix shell and Kermit scripts, at least if you want
  48. us to keep helping you with it.  Yesterday you were complaining about a
  49. loop, but you failed to mention that the loop was in a shell script.
  50. Kermit does loops too.  Please read the manual and other documentation:
  51.  
  52.   http://www.columbia.edu/kermit/ckermit.html#doc
  53.  
  54. and look at the sample scripts:
  55.  
  56.   http://www.columbia.edu/kermit/ckscripts.html
  57.  
  58. - Frank
  59.